package src.main.mubanfangfa;
/**模板方法模式--养猫*/
public abstract class Cat {
    protected void Eat(){
        System.out.println("给猫咪为小鱼干");
    }
    protected void Wash(){
        System.out.println("给猫咪洗澡");
    }
    protected void Sweep(){
        System.out.println("给猫大爷铲屎");
    }
    protected void Play(){
        System.out.println("疯狂撸猫");
    }
    //操作流程模板
    public final void Template(){
        System.out.println("==========流程=============");
        Sweep();
        Wash();
        Eat();
        Play();
        System.out.println("===========end=============");
    }
}
